# -*- coding: utf-8 -*-
import time

def sleep(s):
    return time.sleep(s)


def str2int(str):
    '''
    时间格式字符串转出整数
    :param str:
    :return:
    '''
    time_arr=str.split(':')
    length=len(time_arr)
    total_time=0
    if length==2:
        total_time=int(time_arr[0].strip())*60+int(time_arr[1].strip())
        pass
    elif length==3:
        total_time = int(time_arr[0].strip()) * 3600 + int(time_arr[1].strip()*60)+int(time_arr[2].strip())
        pass
    return total_time


def get_now_time():
    return time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time()))

def get_time(format):
    return time.strftime(format, time.localtime(time.time()))

if __name__ == '__main__':
    # r=str2int(' 01 :15 ')
    # print(r)f
    # print get_time("%Y-%m-%d %H:%M:%S.%f")
    print 1/1000.0
    pass